package cn.tedu.bonfire.admin.account.dao.persist.repository.impl;


import cn.tedu.bonfire.admin.account.dao.persist.mapper.UserAndRoleMapper;
import cn.tedu.bonfire.admin.account.dao.persist.repository.IUserAndRoleRepository;
import cn.tedu.bonfire.admin.account.pojo.entity.UserAndRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserAndRoleRepositoryImpl implements IUserAndRoleRepository {

    @Autowired
    private UserAndRoleMapper userAndRoleMapper;


    @Override
    public int insert(UserAndRole userAndRole) {
        return userAndRoleMapper.insert(userAndRole);
    }

    @Override
    public int updateRoleIdByUserId(Long userId,Long roleId) {
        return userAndRoleMapper.updateRoleIdByUserId(userId,roleId);
    }

    @Override
    public int updateUserDescriptionByUserId(Long userId, String description) {
        return userAndRoleMapper.updateUserDescriptionByUserId(userId,description);
    }

}
